<form action="" class="form-horizontal" role="form">

  <div class="form-group">
    <label class="col-sm-2 control-label">登录页标题</label>
    <div class="col-sm-2">
      <input type="text" class="form-control" name="login_title" placeholder="登录标题" datatype="*2-20" value="{$customerManagerConfig.login_title}"/>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">登录提示文本</label>
    <div class="col-sm-2">
      <input type="text" class="form-control" name="form_text" placeholder="登录提示文本" datatype="*2-20" value="{$customerManagerConfig.form_text}"/>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">登录页Logo</label>
    <div class="col-sm-3">
      <input type="text" id="login_logo" name="login_logo" class="form-control margin-bottom" value="{$customerManagerConfig.login_logo}"/><input type="file" name="file_upload" id="image_upload" />
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">登录页Logo</label>
    <div class="col-sm-3">
      <input type="text" id="login_form_logo" name="login_form_logo" class="form-control margin-bottom" value="{$customerManagerConfig.login_form_logo}"/><input type="file" name="file_upload3" id="image_upload3" />
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">管理页Logo</label>
    <div class="col-sm-3">
       <input type="text" id="logon_logo" name="logon_logo" class="form-control margin-bottom" value="{$customerManagerConfig.logon_logo}"/><input type="file" name="file_upload1" id="image_upload1" />
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">管理页标题</label>
    <div class="col-sm-3">
       <input type="text" name="title" class="form-control margin-bottom" value="{$customerManagerConfig.title}"/>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">登录页模板</label>
    <div class="col-sm-2">
       <input type="text" id="tpl" name="tpl" class="form-control" value="{$customerManagerConfig.tpl}"/>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">登录页背景</label>
    <div class="col-sm-2">
       <textarea class="form-control margin-bottom" id="backgroundimgs" name="backgroundimgs" style="width: 444px; height: 178px;">{$customerManagerConfig.backgroundimgs}</textarea><input type="file" name="file_upload2" id="image_upload2" />
    </div>
  </div>

  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-8">
      <input name="id" type="hidden" value="{$customerManagerConfig.id}" />
      <button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/customerManagerConfigSave">保存更改</button>
    </div>
  </div>
</form>

<!-- uploadify -->
<link rel="stylesheet" href="__PUBLIC__/Style/Common/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Common/uploadify/jquery.uploadify.min.js?{:rand(0,9999)}">
</script>
<script type="text/javascript">
  $(function(){
	  
    $("#image_upload").uploadify({
      'multi': false,
      'fileSizeLimit'  : '200kb',
      'buttonText'     : '选择图片',
      'fileTypeDesc'   : 'Image Files',
      'fileTypeExts'   : '*.jpg; *.png; *.gif',
      'swf'            : '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
      'uploader'       : '__MODULE__/Upload/uploadOne',
      'onUploadSuccess': function(data, res) {
        var url = eval("(" + res + ")").extra.url;
        $("#login_logo").val(url);
      }
    });
    $('#login_logo').imagePreview();
    
    $("#image_upload1").uploadify({
        'multi': false,
        'fileSizeLimit'  : '200kb',
        'buttonText'     : '选择图片',
        'fileTypeDesc'   : 'Image Files',
        'fileTypeExts'   : '*.jpg; *.png; *.gif',
        'swf'            : '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
        'uploader'       : '__MODULE__/Upload/uploadOne',
        'onUploadSuccess': function(data, res) {
          var url = eval("(" + res + ")").extra.url;
          $("#logon_logo").val(url);
        }
     });
     $('#logon_logo').imagePreview();
     
     $("#image_upload3").uploadify({
         'multi': false,
         'fileSizeLimit'  : '200kb',
         'buttonText'     : '选择图片',
         'fileTypeDesc'   : 'Image Files',
         'fileTypeExts'   : '*.jpg; *.png; *.gif',
         'swf'            : '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
         'uploader'       : '__MODULE__/Upload/uploadOne',
         'onUploadSuccess': function(data, res) {
           var url = eval("(" + res + ")").extra.url;
           $("#login_form_logo").val(url);
         }
     });
     $('#login_form_logo').imagePreview();
     
     $("#image_upload2").uploadify({
         'multi': false,
         'fileSizeLimit'  : '200kb',
         'buttonText'     : '选择图片',
         'fileTypeDesc'   : 'Image Files',
         'fileTypeExts'   : '*.jpg; *.png; *.gif',
         'swf'            : '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
         'uploader'       : '__MODULE__/Upload/uploadOne',
         'onUploadSuccess': function(data, res) {
           var url = eval("(" + res + ")").extra.url;
           $("#backgroundimgs").val($("#image_background").val() + "\r\n" + url);
         }
      });
      
  });
</script>